package addon.w3.w3x;

import java.io.IOException;

public class W3XPathMap extends W3XCom {
	int version = 0;
	
	int width = 0;
	int height = 0;
	
	byte path[][];
	
	public W3XPathMap(byte data[]) {
		super(data);
	}
	
	public void _decode() throws W3XException, IOException {
		byte id[] = new byte[4];
		lein.read(id);
		if(!new String(id).equals("MP3W")) {
			throw new W3XException("Invalid w3do tag="+new String(id));
		}
		version = lein.readInt();
		width = lein.readInt(); //unknown
		height = lein.readInt();
		
		path = new byte[height][width];
		
		for(int i=0;i<height;i++) {
			for(int q=0;q<width;q++) {
				path[i][q] = lein.readByte();
			}
		}
	} 
}